$FA contains battle speed, $00-07. at battle start, frame delay taken from lookup table, stored in $6bac. stored in 6ad0 when timed message created
$F5 counts down when walking, triggers battle at <#$00

$6AA8 stores #times to shuffle during combat after confirm action & during attack shuffle, cast animation, and slash animation. $68AB stores #pixels to shuffle to right per time
	first written @0c:9e1e, for all motions;	decremented at 0c:9e3d, for all motions
	
8frame slash/40frame cast w/bypass	16frame slash/48frame cast w/out bypass
6frames/# for spells without bypass	5frames/# with bypass
ppu $3f10 gets spell color stored in it, propagates to $3f00, comes from $6b97, comes from $89 @a065, comes from $6ba0
	,comes from 6b81 for fire

ppu $013 copied from $0213, written when char1 shuffles, read from $68AF
0c:9806 copies $68af to $0213, $0217 etc.
0c:991d loads value for $68af from $6ad3,y(0-4-?) each row
$6ad3 ends up in $0213. written to at 0c:9e37, adds value of $68ab
$68ab written for turn shuffle at 0c:9e02/31e12 & 9e09. 9e1d/31e2d stores #$08
	@9e79 for walk to attack, 9eba for walk back. 9e82/31e92 for attack animation #08->0C?

0f:d95b checks for end of transition to overworld, is 0 when no more palette transitions. 54frames normally. palette stored in 03f0-f, compared to 03c0-f

0f:d8f0 changes emphasis bits when transitioning to battle. 0f:d90a/3d91a sets transition time to $41 frames

@bda2/27da2 map screen moves pixels one row at a time from $0500-05ff to PPU $0000-0fff. 8.5-10 scanlines to do 1 row. can do twice before scanline 260? 09-0c/0f-12 x4kb. 8e00->24e00	be00->27e00	ce00->03ce00	fe00->03fe00
bda5 stores #$ff to PPU@01AE from $05AE, loaded @be23/27e23 from tile color lookup table @bf80/27f80-bfff.
94 is forest; b6 is oasis; b7 is south desert; c3 is desert patches; c5 is most desert; d4 is lt green grass; d5 is marsh; f8 is ports
ocean: 83, 85, 86, 87, 88,
river: 90, 92, a2, a6, a8, b0, b1, b3, e1, f1, 
problematic: 91?, a0?, e0?, f0?

player names stored @6128/6168/61a8/61e8. upon exiting character rearrange, 6168 rearranged then copied to 6c68.
char curhp stored at 610a/614a/618a/61ca

$1a=0e/14	$54=c8/200	$55=20/32	window 16wide,18high	20c8-20d7, 20c8-22e8
sub@3e0fc:top	1a is # of straight lines in window width, 55/54 are ppu address to put upper-left corner of window at
sub@3e0d7:bot	1a is # of straight lines in window width, 55/54 are ppu address to put lower-left corner of window at
sub@3e0a5:cnt	1a is # of blanks in window width, 55/54 are ppu address to put upper-left corner of window at
@3dcab	$3b is window type? (uses lookup table), $3a is horizontal offset of start, sets $55 and $54 according to table
@3e082 dec $1b	stores # of vertical lines
@3e063 start of main window-drawing function? $3c is total window width, $3d is total window height+1.
	$38 copied to $3a, $39 to $3b
@39915 sets up char rearrange screen	@99a7-da is main loop
@9b91/39b91 draws char names, also called when swapping. calls 9c2e for each. neither sub called in battle or menu. 
names displayed@ppu 210a,218a,220a,228a	player names stored @6128/6168/61a8/61e8
x=6,46,86,c6/0,40,80,c0. need 212a,21aa,222a,22aa	 storing 21 then 2a puts tile at ppu $212a
char curhp stored at 610a/614a/618a/61ca
de36->3de36	be36->3be36	8e36->38e36
@8f89 sub converts hp from hex to dec, stores digits in $5d,$5e,$5f (100s,10s,1s). vars also hold name digits
@8ebd converts leading digits of zero to blank
$0301=00,0309=40,0311=80,0319=c0; after swapping first two: 40,00,80,c0; exiting screen reorders data
	name offset from $6128
$55 and $54 contain ppu address for name to be put: 2110,2190,2210,2290

$33 is player direction, 2=left, 1=right, 4=down, 8=up. 0 defaults to right
when loading town/dungeon,		d005 sets to #08, reads at d045, d01c sets to 00, cfa9 sets to 04
when loading overworld, c712 sets to 00,d005 sets to #08, reads at d045, d01c sets to 00
ca6c/e29e/d045/cd1b/c3c4/c2cf read for player direction
@d005/3d015	33 must set to #$08
@d045/3d055	33 must load $33, needed when moving. #$08 no good
d007 calls d023, leading to d045
c9
inn: 7bcf3ccf 14c9 11c205c1	weapons: 7bcf3ccf 14c9 11c205c1		temple: 7bcf3ccf 14c9 11c205c1
item shop: 7bcf3ccf 14c9 11c205c1	black magic: 7bcf3ccf 14c9 11c205c1
leaving other weapon shop: 7bcf3ccf 14c9 11c205c1
leaving other inn: 7bcf3ccf 14c9 11c205c1	leaving battle in volcano: 05d07bcf3ccf 48c9 11c205c1
c8
arrange in town: 7bcf3ccf f4c8 11c205c1	menu in town: 7bcf3ccf f4c8 11c205c1 entering town: 7bcf33cf b5c8 11c205c1
entering castle: 7bcf33cf b5c8 11c205c1	changing floor in castle: 7bcf33cf b5c8 90c9010800 0b05 11c205c1
entering other town: 7bcf33cf b5c8 11c205c1	entering cave: 7bcf33cf b5c8 11c205c1
menu other town: 7bcf3ccf f4c8 11c205c1
c7
leaving town: 29c7 cdc005c1	arrange overworld: 29c7 64c705c1
fleeing battle: 29c7 64c705c1	won battle: 29c7 64c705c1	leaving other town: 29c7 cdc005c1
c0		
leaving cave, castle: 29c7 cdc0 11c205c1
05
leaving/down floor in castle: 7bcf33cf b5c8 90c90118000b0590c9010800 0b05 11c205c1
$1fb==#$c9 or $1fa==#$14

$6aa6 is battle controller buffer.
$10 for up, $20 down, $40 left, $80 right, $2 B, $1 A, $4 select, $8 start.	$0C for start+select
$688f is selected action for char1. $6893 for char2. $6897 for char3. $689B for char4.
	$04=attack, $40=magic, $08=drink, $10=equipment, $20=Run
$6890 is action parameter for char1. 6894 for char2. 6898 for char3. 689c for char4.
	set to $10 when running, $04 for Fire
$6891 is target for char1. 6895 for char2. 6899 for char3. 689d for char4.
	target is self for Run. $80 for char1 to $83 for char4.
	$00-08 for enemies; 00 and 03 in center, 1&4 above, 2 below
$9d60 writes from $68b3 to $6aa6 only when at main battle menu and in drink/wield equipment menus, not during anims
	jmp to $9374/9e06 after setting vars?	activates selected option. 30000-33fff
	$6b7a holds active character #. $6b7b holds enemy #, 1,0,2,4,3 etc. when choosing enemy
after char3, goes to 9e06,980c, in 9477 switches to next char
after char4, goes to 9e06,980c, f20f makes windows disappear. @944d when all characters have acted; stack d8c105c1
jsr to $9e1c to get current char to step back. set $68ab to #$02 first so they step to right.
clear glove sprite @97b2, do spriteDMA to update
check not in drink/equip screen before running:
	stack normal: 9e94 3d94d8c105c1		drink: 0896 3d94d8c105c1	select drink target: 4996
	equipment: 9496		select magic target: dd95	ambushed in dungeon: 9e943d94 35c911c205c1
check for character death/stone/paralyze/sleep before action set:
	$6101, 6141, 6181, 61c1 char status. in battle:
	set to $01 when dead. $02 stone. $04 poison. $08 blind. $10 stun. $20 sleep. $40 silent. 00110011=$33
	00->00; 04->40; 08->80; 0c->c0

ensure $3829c is set to #$00 since it terminates a string in shops
$6380-63af magic table for char3
$6890, 6894, 6898, 689c set to spell# -1

controls: $10 for up, $20 down, $40 left, $80 right, $2 B, $1 A, $4 select, $8 start.
$6aaa holds cursor pos. 0,1,2,3,4 etc. when choosing enemy, determines cursor position from upper-left & scrolls down.
	skips numbers for missing enemies. #s are 0,1,2,3 with 4 large enemies
$6aab holds final pos. of formation. $3= 4 large enemies. $7= 2 large + 6 small. $8= 9 small
	$6aef-6af7 hold $ff if slot empty otherwise holds slot #.
	$00 is terminator, bytes after uninitialized. 6af8 only holds terminator
$6ae3 holds cursor X pos., $6ae4 Y pos.		$6aac-6abd hold x,y pos for each enemy according to slot
$6b7b holds selected enemy slot#;	1,4,7	(for 9 small-enemy formation)			102435768
					0,3,6
					2,5,8
	for 4 large-enemy formation, same as $6aaa:	0,2					0123
							1,3
	for 2 large + 6 small formation, large are		0	 & small are	3,6	01324657
								1 			2,5
											4,7
	@9bad checks $68b3 for pressing Down or Up, branches to $9bbb/9bd9. triggers for magic/melee enemy targeting
	30000-33fff & 3c000-3ffff
2+6:$07	9:$08	4:$03	
move 3	move 3	move 2
try 1 column to right, then 2 to right

$6aaa holds cursor pos. 0,1,2,3,4 etc. when choosing enemy, determines cursor position from upper-left & scrolls down.
	skips numbers for missing enemies. #s are 0,1,2,3 with 4 large enemies
$6aab holds final pos. of formation. $3= 4 large enemies. $7= 2 large + 6 small. $8= 9 small
	$6aef-6af7 hold $ff if slot empty otherwise holds slot #.
	$00 is terminator, bytes after uninitialized. 6af8 only holds terminator
$6b7b holds selected enemy slot#;	1,4,7	(for 9 small-enemy formation)	
$6891 is target for char1. 6895 for char2. 6899 for char3. 689d for char4.
	target is $80 for char1 to $83 for char4.	$00-08 for enemies; 00 and 03 in center, 1&4 above, 2 below
	0->00	1->40	2->80	3->C0		3 ROR
$6be4 enemy stats? 20 bytes per, offset by slot#.
$6bb7-6bbf stores #$ff if enemy dead, offset equals slot# 102435768
$a366 loads target for melee. A & X safe	30000-33fff	3c000-3ffff
$a3b0 loads target for magic. A & X safe
$a380 loads target for Potion/item. A & X safe
$a38e for Equipment

	happy/normal/crouch sprites for those who can equip & if better/worse than equipped
fighter normal tiles $00-05,  celebrating 0e-13, crouching 14-19
$0D bank loaded when loading prices (34000-37000). $0E when doing sprites. useful 57B function@3bc0a for weaps & armor
Staff price stored in $5e-5f, from $10. staff price from bc3c/$37c4c.
	838f/$3838f->$0300->$0316 gives #$1e->$3e asl, #$3c stored in $12, #$bc stored in $13. $A867 stores into $0316.
	0300-0305=1e,1d,1f,20,1c	ROM 01,06,07,02,03	screen 7,6,2,3,1	3838f-93 is shop table
	0310-0337 is loaded shop item table, 8 bytes per weapon/armor.
	loads from $0300-0305 to determine spell/equip/item#.
	$62 is menu selections, for all menus. load $0300 offset by $62 to get selected item#
	for weaps, sub #$1B from shop item# to get inventory item#
	for armor, sub #$43 from shop item# for inventory item#
	$8000/30000 weapon table (bank $0C). 8 bytes per entry. (inv. item# -1) * 8 + 1 offset to get dmg entry
	6118-1b, 6158-5b, 6198-9b, 61d8-db character weapon slots. ora #$80 for equipped.
	$611c-f,615c-f,619c-f,61dc-f character armor slots
	6120 is char1 attack, 6121 is char1 accuracy.	
	6120 adds $8019@ee81 when leaving weapon screen for Rapier, $8008/30008 for Knife accuracy, $8009 for dmg.
	knife 5dmg item# $02	rapier 9dmg item# $04		cat claw 22dmg 8110?
	sub 1 from equipped value eg. #$84, then asl x3 for $8001 offset for damage
	w.mage $80 $00	fighter $00 $08
	$bf50,2*(item#-1)
	$03d0-f contains sprite palette
	char free: 612e,X; use $14 and $15 for addr.
in 3bc0a function (determines if item can be equipped):
	@bc1e loads bcc1-2 when white mage equips weapon, bcb9+ 2*class#. $6180 is class# for char3 ($04).
	6100,6140,6180,61c0 class# is stored
	$14 and $15 store class bits. $10 stores 2*(item#-1).
	$66 is $18 in weapon menu, $1c in armor menu. $00 in all weapon shops, $01 in all armor shops
	bf56->$CB, AND $80->$80; bf57->$02, AND $00->$00 OR (result of AND)$80->$80, cmp #$01 for w.mage rapier
		if class's bit is set in item equip bits, then it's restricted
	bfa0/1 data table for armor
	$10/14/15 used in checking subs
	1c 0001 1100	01 0000 0001		18 0001 1000	00 0000 0000	AND #$05
	switch from bank $0E to $0C to access dmg table
	$fe1a is function for bank switching. acc holds desired bank
in ebfd/3ec0d function (draws player sprites in buildings & menus):
	ec0a loads status. stores tile offset to use in $10->$16. stores palette in $11
	$01f8=#$d1 when in armor/weapon shop buy menu
	AND #$EB to get rid of #$14 crouch

read from controller into $20. $b65d is joyread sub
entering Magic:
	$ae81 loads $24, $ae91 reads selected char# from $62, copies to $66; RTS to $ae22 when press A. $ae24 loads $62
	$66 modified & stored in $6c01-85.
	$b975 reads $66. $66 read @ba79. $6300-632f store char's magic table.
	from $aec6, inc $66 then jmp to $ae24
entering Status:
	$ae81 loads $24, $ae91 reads selected char# from $62, copies to $66; RTS to $ae5e
	$66 modified & stored in $6c01-79. $b500 loads $66
	from $b616, inc $66 then jmp to $ae60
$b683 stores #$00 in $24,$25;	$d847 (in joyread sub) inc $24 when pressing A to enter Magic/Status screens
$b613 calls joyread in Status, the Magic screen for non-casters, and after healing in a menu
	stack on magic:		3fae43caf4c811c205c1	F5	or	3fae96c105c1	F9
	stack on status:	62ae43caf4c811c205c1		or	62ae96c105c1
	stack on heal:	    2bb317ae43caf4c811c205c1		or  2bb317ae96c105c1
$aec6 calls joyread in Magic screen for chars with spells
	stack:			3fae43caf4c811c205c1	F5	or	3fae96c105c1	F9
$ae22 starts loading Magic screen
@aec6		jsr $b65d		A,X,Y safe
				    43caf4c811c205c1	F7	or	    96c105c1	FB
Y is 3f for full/empty spell screen, 62 for status, a3 for heal/cura, 3d for raise, 9d for poisona, c7 for stona




					BASIC:

2->1 frame per tick in battles, for walk/slash animations
@31ede 4c 99 97->60 ea ea


remove flashing from spellcasting
@0c:a065/32075 A5 89->A9 0F


sets fleeing char turnaround delay from 16 to 12 frames
@02dfc4 0F->0B


set transition into battle from 64 to 32 frames
@0f:d90a/3d91a $41->$21


set transition from battle and to/from menus from 4 frames per color cycle to 2 frames
@0f:d955/3d965 $03->$01


screenwipe for towns etc. at double speed
for closing wipe, d712 adds 2 to $14; d719 subs 4 from $15, doubled to offset $14 scrolling
@3d723/d713	#$02->#$04
@d71a	#$04->#$08
d71e	#$01->#$fd
for opening wipe, 6def subs 2 from $14; d6f6 adds 4 to $15
@d6ee	#$02->#$04
@d6f5	#$04->#$08
@d6f9	#$e0->#$e1


swap characters at double speed
$204 vertical, $203 horizontal. $204 loaded from $41, loaded from $0303. 0203 from 0302
@9b0f/39b1f	01->02
@9b16/39b26	01->02
@9b1f/39b2f	01->02
@9b26/39b36	01->02





					STANDARD:


Start+Select in battle to auto-run all 4 chars	85B
@9d55/31d65	jmp $9d5d->jmp $fd3e
@fd3e/3fd4e	
  lda $68B3  cmp #$0C  bne $FD4D  tsx  lda $0102,X  cmp #$94  beq $FD50  jmp $9D5D  ldx #$0C  ldy #$03  stx $16
  txa  asl A  asl A  asl A  asl A  tax  lda $6101,X  ldx $16  and #$33  bne $FD74  lda #$20  sta $688F,X  lsr A
  sta $6890,X  tya  ora #$80  sta $6891,X  dey  dex  dex  dex  dex  bpl $FD54  lda #$02  sta $68AB  jsr $97B2
  lda #$02  sta SpriteDma_4014  jsr $9E1C  pla  pla  pla  pla  jmp $944D  nop

ADB368C90CD008BABD0201C994F0034C
5D9DA20CA00386168A0A0A0A0AAABD01
61A6162933D00FA9209D8F684A9D9068
9809809D916888CACACACA10D9A9028D
AB6820B297A9028D1440201C9E686868
684C4D94EA


press left/right on battle screen enemy selector to move cursor left and right		65B
@9ba7/31bb7	jsr $9bad->jsr $fd93
@fd93/3fda3	  ldx #$02  lda $6AAB  cmp #$03  beq $FD9D  inx  stx $16  lda $68B3  cmp #$80  beq $FDB3  cmp #$40
  beq $FDAD  jmp $9BAD  lda #$00  sbc $16  sta $16  lda $6AAA  clc  adc $16  cmp $6AAB  bcc $FDC3  beq $FDC3
  jmp $9BAD  tax  ldy $6AEF,X  cpy #$FF  beq $FDB6  sta $6AAA  sty $6B7B  jmp $9BAD

A202ADAB6AC903F001E88616ADB368C9
80F00DC940F0034CAD9BA900E5168516
ADAA6A186516CDAB6A9005F0034CAD9B
AABCEF6AC0FFF0EB8DAA6A8C7B6B4CAD9B


map speedup, 2 rows per frame, 8 frames total/block; down from 12 frames/block	16B
@bc3a/27c4a	jsr bd91->	jsr fddf
				20 E4 FD
@fddf/3fdef	jsr fe00	lda #$00	sta $67	tax	jmp bd9a
		20 00 FE	A9 00		85 67		AA	4C 9A BD
@27da7	jsr fe00->jsr fdea
		20 EA FD
@fdea/3fdfa	and #$01	beq +18($fe00)	rts
		29 01		F0 12		60


press Select in status screen to swap characters	(standard version)	40B
@b613/3b623		jsr $b65d->jsr $f127	A,X,Y safe
@f127/3f137												
  jsr $B65D  tsx  ldy $0103,X  cpy #$62  bne $F126  ldx $20  cpx #$20  bne $F126  ldx $22  cpx $13  beq $F126
  stx $13  inc $66  lda $66  and #$03  sta $66  pla  pla  pla  pla  jmp $AE60

205DB6BABC0301C062D0F4A620E020D0
EEA622E413F0E88613E666A566290385
66686868684C60AE



maintain direction when switching screens, but face down when leaving a shop	25B
@d003/3d013	jsr $f151	nop
		20 51 F1	EA
@f151/3f161	ldx $33  lda $01FA  cmp #$14  bne $2  ldx #$04  stx $1B  lda #$08  sta $33  rts
		A633ADFA01C914D002A204861BA908853360
@d01a/3d02a	jsr $f163	nop
		20 63 F1	EA
@f163/3f173	lda $1B	sta $33	lda #$00	rts
		A51B8533A90060
@c712/3c722	nop nop
		EA EA
@cfa9/3cfb9	nop nop
		EA EA

remove 'ineffective' targeting of dead enemies/allies; switch to next enemy/ally - optional patch	60B
@a366/32376	ldx $6891,y	->jsr $f16a
		BE 91 68	->20 6A F1
@a3ad/323bd	lda $6890,y		ldx $6891,y	->jsr $f16a,	lda $6890,y
		B9 90 68		BE 91 68	->20 6A F1		B9 90 68
@a37d/3238d	lda $6890,y		ldx $6891,y	->jsr $f16a,	lda $6890,y
		B9 90 68		BE 91 68	->20 6A F1		B9 90 68
@f16a/3f17a
  ldx $6891,Y  cpx #$80  bcs $F186  cpx #$09  bcs $F185  lda $6BB7,X  cmp #$FF  bne $F185  inx  cpx #$09  bne $F175
  ldx #$00  beq $F175  rts
  txa  and #$0F  clc  ror A  ror A  ror A  tax  lda $6101,X  cmp #$01  bne $F19D  txa
  clc  adc #$40  tax  jmp $F18E  txa  clc  rol A  rol A  rol A  ora #$80  tax  rts

BE9168E080B015E009B010BDB76BC9FF
D009E8E009D0F4A200F0F0608A290F18
6A6A6AAABD0161C901D0088A186940AA
4C8EF18A182A2A2A0980AA60



add indicator to shop for who can equip items/attack power vs. equipped
@ebff/3ec10		sta $10->$16		use $16 instead of $10 to free up for $bc19 subroutine
@ec57/3ec68		lda $10->$16
@bc28/3bc38	ldy $66, cpy #$18	->lda $66	and #$05		#$18, #$00 stay; #$1c, #$01 go to armor sub
					->A5 66	29 05
@bc7b/3bc8b	bcc $bc7e, rts	->jmp $f100				skips armor slot testing in shop
					->4C 00 F1
@9f78/39f88	sta $10, jmp $ec24->sta $16	jmp $ec22		fixes char creation
					->85 16	4C 22 EC
@f100/3f110	bcc $F103  rts  lda $01F8  cmp #$D1  clc  beq $F102  jmp $BC7E		14B	armor sub helper
		900160ADF801C9D118F0F74C7EBC

@f1a6/3f1b6						90B		main sub
  lda $01F8  cmp #$D1  bne $F1FD  ldy $62  lda $0300,Y  ldy $66  sec  beq $F1B9  sbc #$28  sbc #$1C  asl A  sta $10
  sta $18  txa  tay  jsr $BC19  tya  sta $10  bcc $F1CF  clc  adc #$28  bne $F1D1  adc #$1C  lsr A  sta $16  and #$10
  bne $F1FD  ldx $66  bne $F1FD  lda $18  asl A  asl A  sta $14  txa  adc #$80  sta $15  inc $14  lda #$0C  jsr $FE1A
  lsr $10  lda $612E,Y  cmp ($14,X)  jsr $F10E  lda #$0E  jsr $FE1A  ldx $26  rts
ADF801C9D1D050A462B90003A46638F0
02E928E91C0A851085188AA82019BC98
85109005186928D002691C4A85162910
D025A666D021A5180A0A85148A698085
15E614A90C201AFE4610B92E61C11420
0EF1A90E201AFEA62660


@f10E/3F11E						17B		leftovers for main sub
  bmi $F119  beq $F11A  lda $10  clc  adc #$14  sta $16  rts  lda $10  sta $16  rts
3009F008A510186914851660A510851660

@ee7d/3ee8d				set 612e, 616e, 61ae, or 61ee to weapon damage when leaving Weapon screen
		lda $6120,x  clc  adc ($10),y  sta $6120,x->lda ($10),y  sta $612e,x  clc  jsr $f120 (FFR:$f11f)
B1109D2E61182020F1

@f120/3F130	(FFR:@f11f)	adc $6120,X  sta $6120,X  rts			7B	$ee7d overflow
7D20619D206160

@edfa/3EE0A
		sta $6120,x	->jsr $fdd4
				->20 D4 FD

@fdd4/3FDE4					9B	clear 612e etc. when going into Weapon screen with weapon equipped
		sta $6120,x  lda #$00  sta $612e,x  rts
9D2061A9009D2E6160


@ec0a/3ec1a		make dead chars standing ghosts, use $16 instead of $10 to free for $bc19 sub
  ldy $6101,X  beq $EC22  cpy #$01  beq $EC1E  lda #$14  clc  adc $16  sta $16  cpy #$03  beq $EC22  lda #$03
  sta $11  jsr $F1A6  lda $40 nop
BC0161F013C001F00BA9141865168516
C003F004A903851120A6F1A540EA

fix fade in/out at inn for ghosts/statues
@$ff22/3FF32 ldx #$07->#$0f	fadeout
@$ff42/3FF52 ldx #$07->#$0f	fadein
@$ff64/3FF74 ldx #$07->#$0f	copies original values




					STANDARD (FULL):
glitched broom sprite @b2e0 in Restored/touchup/stock U & J/redux/adamant/ultra champion/dawn warriors/ff-1.	fixed in GFF/Manall's. unneeded in ff++

set mountains on map screen to light gray
@27f33 2B->3D


better representation of waterways on map screen
@27f90-2800f		set to #$00
ocean: 	93, 95, 96, 97, 98
river: 	a0, a1, a2, b0, b2, b6, b8, c0, c1, c3, f0, f1, 00, 01


redraw map screen cursor @27f10 in stock U & J/Restored/redux/adamant/ultra champion/dawn warriors/manall/ff++/ff-1.	unneeded in GFF
				 * *
				*   *

				*   *
				 * *




					FFR VERSIONS ONLY:
for FFR/chaos rush script port
	'White Wizard': Wh{7E}{7F} W{EC}{ED}{EE}d -> Wh{7E}{7F}{FF}W{EC}{ED}{EE}d
	Resist KO{15}Status{15}Earth
	cottage:					 _ M  P  _a nd _m  a  g  i  c  _ nl
	HP and MP and magic	@38823	ff 96 99 20 3b 42 a4 aa ac a6 ff 05
							_m ag  i  c  _ re  c  o ve re  d
	HP and magic recovered			42 6b ac a6 ff 23 a6 b2 32 23 a7 05
for FFR
	string 'led here'		@29f3b 	2b->a8
	ending 'water earth' @369aa		1c 1a a0 1f a7 15 a0 39 25		the Wind, Water Earth, and Fire.
						a0 1f a7 15 a0 39 25 15 ff		Wind, Water, Earth, and Fire.



press Select in status screen to swap characters	(FFR version)	43B
@b613/3b623		jsr $b65d->jsr $f126
@f126/3f136  jsr $B65D  tsx  ldy $0103,X  cpy #$62  beq $F134  jmp $846C  ldx $20  cpx #$20  bne $F125
  ldx $22  cpx $13  beq $F125  stx $13  inc $66  lda $66  and #$03  sta $66  pla  pla  pla  pla  jmp $AE60

205DB6BABC0301C062F0034C6C84A620
E020D0EBA622E413F0E58613E666A566
29038566686868684C60


*press Select in magic screen to swap characters			22B (code placed outside RNG area)
@aec6/38aed6	jsr $b65d->jsr $8469
@8469/@38479	jsr $B65D  lda #$82  pha  lda #$1D  pha  lda #$0D  jmp $FE1A  bvc $847D  clv  jmp $AE24  rts
205DB6A98248A91D48A90D4C1AFE5004
B84C24AE60

@821e/@3422e	  tsx  ldy $0103,X  cpy #$3F  bne $8246  ldx $20  cpx #$20  bne $8246  ldx $22  cpx $13  beq $8246	68B overflow
  stx $13  jsr $8251  cmp #$01  beq $8234  cmp #$02  beq $8234  bit $8261  pla  pla  pla  pla  lda #$84  pha
  lda #$76  pha  lda #$0E  jmp $FE1A  inc $66  lda $66  and #$03  sta $66  clc  ror A  ror A  ror A  tax  lda $6101,X  rts
BABC0301C03FD020A620E020D01AA622
E413F0148613205182C901F0F9C902F0
F52C618268686868A98448A97648A90E
4C1AFEE666A56629038566186A6A6AAA
BD016160



*display hp on rearrange screen	81B (code placed outside RNG area)
@9c51/39c61	jmp de36->jmp 828d
		4C 36 DE->4C 8D 82
@828D/3829D
  stx $16  jsr $DE36  lda $16  and #$F0  tax  ldy $55  lda $54  clc  adc #$1A  sty PpuAddr_2006  sta PpuAddr_2006
  lda #$91  sta PpuData_2007  lda #$99  sta PpuData_2007  lda #$FF  sta PpuData_2007  lda $610A,X  sta $10
  lda $610B,X  sta $11  jsr $8F89  jsr $8EBD  lda $5D  sta PpuData_2007  lda $5E  sta PpuData_2007  lda $5F
  sta PpuData_2007  lda #$00  sta PpuScroll_2005  sta PpuScroll_2005  jsr $FE00  rts

86162036DEA51629F0AAA455A5541869
1A8C06208D0620A9918D0720A9998D07
20A9FF8D0720BD0A618510BD0B618511
20898F20BD8EA55D8D0720A55E8D0720
A55F8D0720A9008D05208D05202000FE60




optional antigrind patch:
3x XP/gold for all enemies
lvl 1 spells 100->40; lvl 2 400->250; lvl 3 1500->700; lvl 4 4000->1000; lvl 5 8000->5000
Antidote 75->50		Gold Needle 800->500

2x xp: clay golem, minotaur zombie, medusa, rakshasa, king mummy, dragon zombie, sea troll, sea scorpion, sea snake, water naga, aquos/water, sahagin prince, sahagin chief,
ghost, big eye/deepeyes, kraken, nightmare, green dragon, black knight, chimera, guardian, sabretooth, weretiger, wyvern, wyrm, aeros/air, spirit naga, manticore, 
earth medusa, vampire lord, tiamat, tyrannosaurus, allosaurus, bulette, desert bulette, white shark, blue dragon, doom knight, stone golem, soldier, dark warrior
black flan
reduce green dragon/black knight/gorgomera/red dragon gil, so battle gil<33000. reduce purple worm XP so battle XP <=40000


75 coneria rapier 10 + chainmail 80=90; knife 5 +clothes 10=15.
1365 provoka broad 550 + iron 800 + leather shield 15 + leather gaunts 60=1425; gaunts 60=60
545 elfland longsword 1500 + helmet 100 + bronze gaunts 200=1800;
	dagger 175 + copper bracelet 1000 + leather cap 80=1255
41300 melmond knight's 45000 + iron shield 100 + great helmet 450 + steel gaunts 750=46300 ; silver bracelet 5000=5000
10700 crescent lake m. shield 2500 + m. helmet 2500 + m. gaunts 2500 + m. sword 4000=11500; mythril knife 800=800
-50000 gaia prot. ring 20000=20000;	ruby bracelet 50000 + prot. ring 20000=70000




todo:
change battle speed from party rearrange screen
fix 1-frame sprite bug when cursor disappears, when autofleeing



free in FFRestored stock: 326e7-32700 26B		33ad1-33b07 55B		3422e-342d0 163B		3829d-382ef 83B		38479-3848f 23B		3bffe-3c006 9B		
	

free in FFR w RNG: above plus 3f110-3f20f 256B  & 3fd4e-3fdfe 177B

free in orig:	!3829d, !3f110, !3fd4e, 38477-3848f 25B, 384f2-3850f 30B, 3bffe-3c00f 18B

free in GFF:	!326e7 !33ad1 !3422e !3829d !38479 !3bffe !3f110 !3fd4e

	
rhdn DLs:	ffr 11300	gff 8900	ff++ 6860	ff retrans 4600	ff ultra champion 3870	negative 1 3270	manall 2900

Chicken Knife's ffr rebalancing changes: $3068/3078/2c3ae-f/2dded-e00
pitch fix:			37309-37368
FFR green menu:		3ad8a-3ad92/3eb3a-3eb3e/3f63d-3f653
FFR new music:		34020-34025/340bc-340e5/35ae1-36000/36e20-36fce/375d9-3780e/3c27d-3c2a9		36e20 is code for ship minigame
	GFF							FE		A9		AD
	stock U							FD		A9		FF
	stock FFR						FD		A9		00
FFR RNG improvement: 	35db6-35dbc/3c0b9-3c0bb/3c0c4-3c0c6/3c56e-3c59b/3c517-3c51d/3cdd7-3cddb/3f110-3f20f/3fcf7-3fdfe
	stock FFR		E6		4C		20		E6		85		20		1F		AE
	FFR w/ RNG		EA		4C		20		20		85		20		EA		06
	GFF			EA		4C		20		20		85		20		B2		06
	FF++			E6												1F		AE
	Retrans1.3		E6						03		FF		10		1F		D0
	FF J stock		E6		4C		20		03		FF		10		1F		D0
	FF U stock		E6		4C		20		E6		85		20		1F		AE
	FFR chaosrush		E6		4C		20		E6		85		20		1F		AE
	FF ultra champion	E6						E6		85		20		1F		AE
	FF-1			E6						E6		85		20		1F		AE
	Manall 2.2.1		E6						E6		85		20		1F		AE

J@ 3c55b: lda #$0b, jsr $fe03; 	@3c506 lda $f0ff, sta $10; 	@3cdc5 lda $45, bpl $cdde, jsr $c573; 	@3fcf7 data table
U@ 3c559: lda #$0b, jsr $fe03;	@3c505 lda #$03, sta $10;	@3cdc3 lda $45, bpl $cddc, jsr $c571;	@3fcf5 data table